package proxy;

/**
 * Description:
 * Designer: jack
 * Date: 2017/8/2
 * Version: 1.0.0
 */
public class Captain implements Action {

    private Action action;

    Captain(Action action) {
        this.action = action;
    }


    @Override
    public void attack() {
        System.out.println("教练下命令了，叫你进攻。");
        action.attack();
    }

    @Override
    public void control() {
        System.out.println("教练下命令了，叫你控制球权。");
        action.control();
    }

    @Override
    public void defend() {
        System.out.println("教练下命令了，叫你参与防守。");
        action.defend();
    }
}
